package cn.huiyunche.base.service.enums;

/**
 * @ClassName: BActivityTypeEnum
 * @Description: 活动类型
 * @author: Aaron
 * @date: 2016年9月22日 下午7:43:07
 */
public enum BActivityTypeEnum {

    FEE_DISCOUNT(10, "费用折扣"),
    USERS_WITHDRAW(20, "用户提现"),
    REGISTER_GIFT(30, "注册有礼"),;

    private final int value;
    private final String text;

    BActivityTypeEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static BActivityTypeEnum getByValue(int value) {
        for (BActivityTypeEnum temp : BActivityTypeEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
